<template>
  <div>
    <div class="success_box ub ub-ac ub-pc">
      <div class="ub-img success"></div>
    </div>
    <div class="fz12 ub ub-ac ub-pc wd_100">提交成功</div>
    <div class="ub wd_100 ub-pc">
      <div class="ub order_btn ub-ac ub-pc" @click="goOrder">查看订单</div>
    </div>
  </div>
</template>
<script type="text/ecmascript-6">
import { mapState } from 'vuex';
export default {
  created: function () {
    this.$store.commit('changeHeader', { // 提交首页header
      left: '首页',
      right: '',
      middle: '提交成功',
      ifshow: true,
      leftAction: '/index',
      leftIcon: 'leftIcon',
      rightAction: '',
      rightIcon: ''
    });
  },
  data: function () {
    return {
    }
  },
  components: {
  },
  computed: mapState(['loginData']),
  methods: {
    goOrder: function() {
      if (!this.loginData.isLogin) {
        this.$router.push('/login');
        return false;
      }
      this.$router.push('/orderDetail')
    }
  }
}
</script>

<style lang="stylus" scoped>
@import '../../stylus/base.styl';
.success
  width: f_times(4);
  height: f_times(4);
  background-image: url('tips_sucess.png');
.success_box
  width: 100%;
  height: f_times(12);
.fz12
  font-size: f_times(1.2);
.order_btn
  width:85%;
  height: f_times(2.5);
  background-color:#843D99;
  color: #fff;
  margin-top: f_times(2.5);
  border-radius: 4px;
</style>